/*
* Poppy Game Engine - https://pgetemplate.googlecode.com/svn/
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* Copyright (c) 2008 Poppy
*/

#pragma once

#include "CBinaryStream.h"

namespace PGESystem
{

	class PGESYSTEM_API CMemStream : public CBinaryStream
	{

	public:

		CMemStream( void* data, int size );
		virtual ~CMemStream();

		virtual int GetLength();

		virtual int BinaryRead(void * buffer, unsigned int size);
		virtual int BinaryWrite(void * buffer, unsigned int size);
		virtual int Read(char * buffer);
		virtual int Write(char * buffer);

	protected:

		CMemStream();

		void*	m_pData;
		int		m_dLength;

	};

}
